package com.ganzalang.gmall.gmallfreemarker.demo.controller;

import com.ganzalang.gmall.gmallfreemarker.demo.entity.UserDemoEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class UserDemoController {

    @GetMapping("/user-demo/detail")
    public String demo(Model model) {
        UserDemoEntity userDemoEntity = new UserDemoEntity();
        userDemoEntity.setId(1001L);
        userDemoEntity.setName("Ahaha");
        userDemoEntity.setHeight("178");
        userDemoEntity.setWeight("86");
        model.addAttribute("user", userDemoEntity);
        return "demo/user-demo";
    }
}
